package org.bluedream.core.utils.configUtil;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.bluedream.core.module.login.service.LoginService;
import org.bluedream.core.module.sys.config.entity.Config;
import org.bluedream.core.module.sys.config.service.ConfigService;
import org.bluedream.core.module.sys.entity.Organization;
import org.bluedream.core.module.sys.entity.Role;
import org.bluedream.core.utils.SpringUtil;
import org.bluedream.comm.utils.EmptyUtil;
import org.bluedream.core.utils.UserUtil;

import java.util.List;


public class GoalConfigUtil {
    private GoalConfigUtil(){
        throw new AssertionError();
    }

    public static String getValueByKey(String key){
        ConfigService configService = SpringUtil.getBean(ConfigService.class);
        QueryWrapper<Config> qw = new QueryWrapper<>();
        qw.eq("config_key" , key);
        return EmptyUtil.isNoEmpty(configService.getOne(qw).getConfigValue())?configService.getOne(qw).getConfigValue():"";
    }
}
